{layout name="common/layout"/}

<style>
  .product_cont .section_1 .s1_cont .list {
    margin-right: 2%;
  }
  .product_cont .section_1 .s1_cont .list:nth-child(4n) {
    margin-right: 0%;
  }
  .product_cont .section_1 .s1_cont .tab_cont {
    justify-content: start;
  }
  .pager .pagination {
    display: flex;
  }
  .pager .pagination li:first-child {
    display: none;
  }
  .pager .pagination li:last-child {
    display: none;
  }
  .tab_cont a img {
    height: 250px;
    object-fit: cover;
  }
  @media only screen and (max-width: 768px) {
    .tab_cont a img {
      height: 160px;
      object-fit: cover;
    }
  }
  .news_cont {
    padding: 65px 0 125px;
  }
  .news_cont .title::after {
    background: #12257c;
  }
  .news_cont .news_tab .tab.active {
    color: #12257c;
  }
  /* 列表 */
  .news_cont .tab_cont .image img {
    height: 220px;
  }
  .news_cont .tab_cont .list {
    box-shadow: 2px 2px 10px #ddd;
    padding: 15px;
    border-radius: 5px;
  }
  .news_cont .tab_cont .list:hover {
    box-shadow: 2px 2px 10px #777;
    background-color: #fff;
  }
  .news_cont .tab_cont .list .matter .name {
    color: #333;
  }
  .news_cont .tab_cont .list:hover .matter .name {
    color: #000;
  }
  .news_cont .tab_cont .list .matter .time {
    color: #666;
  }
  .news_cont .tab_cont .list:hover .matter .time {
    color: #333;
  }
  .news_cont .tab_cont .list .matter .text {
    color: #666;
  }
  .news_cont .tab_cont .list:hover .matter .text {
    color: #333;
  }
  .news_cont .tab_cont .list .matter .more {
    color: #666;
    border: 1px solid #5b5b5b;
  }
  .news_cont .tab_cont .list:hover .matter .more {
    color: #333;
    border: 2px solid #12257c;
    transition: 0.1s;
    color: #12257c;
  }
</style>
<div class="public_banner">
  <div class="img w100 h100">
    <img src="__ADDON__/xnr/image/banner_25.png" class="w100 h100" alt="" />
  </div>
  <div class="ban_cont w1300">
    <!--            <div class="title">新闻中心</div>-->
    <!--            <div class="title_en">NEWS CENTER</div>-->
  </div>
</div>
<div class="news_cont" id="new">
  <div class="title">新闻中心</div>
  <div class="subhead">NEWS CENTER</div>
  <div class="news_tab disflex">
    {cms:channellist id="sub" type="son" typeid="88" condition="1=isnav"}
    <a class="tab {if $sub->is_active} active{/if}" href="{$sub.url}#new"
      >{$sub.name}</a
    >
    {/cms:channellist}
  </div>
  <div class="tab_cont w1300">
    {cms:pagelist id="item" orderby="weigh"}
    <a href="{$item.url}" class="list disflex flex_lmr">
      <div class="image">
        <img src="{$item.image}" class="w100 h100" alt="" />
      </div>
      <div class="matter">
        <div class="name">{$item.title}</div>
        <div class="text">{$item.description}</div>
        <div class="mores disflex flex_lmr">
          <div class="time">{$item.publishtime|date="Y-m-d",###}</div>
          <div class="more">查看详情+</div>
        </div>
      </div>
    </a>
    {/cms:pagelist}
  </div>
  <div class="pager">{include file="common/pageinfo" /}</div>
</div>

<script language="javascript">
  $(function () {
    $(".news_cont .tab_cont:not(:first)").hide();
    $(".news_cont .news_tab .tab").click(function () {
      $(this).addClass("active").siblings().removeClass("active");
      var ab = $(this).index();
      $(".news_cont .tab_cont").eq(ab).show().siblings(".tab_cont").hide();
    });
  });
</script>
